export default function (selector){
  //使用promise获取参数
  return new Promise((resolve)=> {
    const query = wx.createSelectorQuery()
    query.select(selector).boundingClientRect()
    // query.selectViewport().scrollOffset()
    query.exec((res)=>{
      resolve(res)
    })
  })
}